home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 May: Tool Chest / Developer CD Series May 1996 (Tool Chest) (Apple Computer) (1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / MCL on PC / DOC-EMUL.TXT next >
Encoding:
Text File  |  1994-09-12  |  6.4 KB  |  250 lines  |  [TEXT/ttxt]

  1. Partial incomplete Doc for MCL graphics in ACL/PC
  2. Code written by Stefan Bamberger and Karsten Poeck
  3. Original MCL code written by Stefan Bamberger, Ute Gappa, Klaus Goos, Karsten Poeck and others
  4. Comments to
  5.  
  6. ------------------------------------------------------
  7. | Karsten A. Poeck
  8. | Lehrstuhl fuer Informatik VI
  9. | Universitaet Wuerzburg
  10. | Allesgrundweg 12
  11. | 97218 Gerbrunn
  12. | Germany
  13. | E-mail: poeck@informatik.uni-wuerzburg.de
  14. | Tel. ++ 49 931 70561 18
  15. | Fax  ++ 49 931 70561 20
  16. ------------------------------------------------------
  17.  
  18.  
  19. Introduction: In MCL windows, dialog-items, menus and menu-items
  20. are clos objects that can be created with calls to make-instance.
  21. All interface stuff is done with generic methods that one
  22. can shadow, and specialize.
  23.  
  24. This is not the case in ACL/PC. Make-instance cannot be called
  25. directly, the interface stuff are functions, not everything can be shadowed
  26. and menu-items are structures, some initargs cannot be specified as :default-initargs
  27. (flames to procyon)
  28.  
  29. To allow portabel code we introduced an layer on top of ACL/PC
  30. Common Graphics that is totally object oriented and has the interface methods
  31. of MCL. Since we have not been able to solve the make-instance problem we introduced
  32. five auxuliaray methods (The names are all in German)
  33.  
  34. m->a=erzeuge-dialog-item (class &rest args)
  35. creates a dialog-item (widget in Common Graphics)
  36.  
  37. m->a=erzeuge-fenster (class &rest args)
  38. creates a non modal window
  39.  
  40. m->a=erzeuge-modal-fenster
  41. creates a window to be used as a modal-dialog
  42.  
  43. m->a=erzeuge-menu
  44. creates a menu (Warning the menubar in ACL/PC is a strange thing documented very unclearly)
  45.  
  46. m->a=erzeuge-menu-item
  47. to create an menu-item (Warning, the menu-items in ACL/PC are structures. To allow generic functions
  48. we create dummy clos-objects and link them to the structures. The interface methods called
  49. on the clos-objects then call the functions of the structures
  50.  
  51. On the macintosh all these methods should be defined as
  52. defun m->a=erzeuge-menu (klasse &rest args)
  53.   (apply #'make-instance klasse args))
  54.  
  55. (defun m->a=erzeuge-menu-item (klasse &rest args)
  56.   (apply #'make-instance klasse args))
  57.  
  58. (defun m->a=erzeuge-fenster (klasse &rest args)
  59.   (apply #'make-instance klasse args))
  60.  
  61. (defun m->a=erzeuge-modal-fenster (klasse &rest args)
  62.   (apply #'make-instance klasse args))
  63.  
  64. (defun m->a=erzeuge-dialog-item (klasse &rest args)
  65.   (apply #'make-instance klasse args))
  66.  
  67.  
  68. We ported our library of windows, dialog-items, menus and menu-items so the names are subclasses
  69. of the MCL-ones.
  70. !Warning, all this is port on demand, we have omitted a lot of features!
  71. Essentially we provide:
  72.  
  73. dialog-items;;;;;;;;;;;;;: in the file dos-at
  74. mac-dialog-item-mixin understands
  75. :view-size
  76. :view-position
  77. :view-font ;warning, the font format in ACL/PC is different
  78. :view-nick-name
  79. :view-container
  80. :dialog-item-enabled-p
  81.  
  82.  
  83. Emulated methods for dialog-items
  84. set-view-container
  85. ;When set-view-container is called and the dialog-item does not have a size
  86. ;a default size is computed depending on the dialog-item-text
  87.  
  88. dialog-item-enable
  89. dialog-item-enabled-p
  90. dialog-item-disable
  91. set-view-position
  92. view-size
  93. set-view-size
  94. view-position
  95. set-dialog-item-text
  96. dialog-item-text
  97. view-container
  98. special dialog items
  99. *B-STATIC-TEXT-DIALOG-ITEM*
  100. :dialog-item-text
  101.  
  102. *b-zahl* (additional  widget to represent numbers)
  103. :f-nach-taste (function-called-after-a-key-is-pressed)
  104.  
  105. *b-text* (additional  widget to represent text, aka editable-text-dialog-item )
  106. :f-nach-taste
  107.  
  108. *b-radio-button-dialog-item*
  109. :dialog-item-text
  110. :radio-button-cluster
  111. :dialog-item-action
  112. :radio-button-pushed-p
  113.  
  114. Methods:
  115. radio-button-push
  116. radio-button-unpush
  117. radio-button-pushed-p
  118.  
  119. *b-check-box-dialog-item*
  120. :view-nick-name
  121. :dialog-item-text
  122. :dialog-item-action
  123. :check-box-checked-p
  124.  
  125. Methods:
  126. check-box-check
  127. check-box-uncheck
  128. check-box-checked-p
  129.  
  130. *b-button-dialog-item*
  131. :dialog-item-text
  132. :dialog-item-action
  133.  
  134. *b-ok-button*
  135.  
  136. *b-abbrechen-button* (A cancel button)
  137.  
  138. *bb-sequence-dialog-item*
  139. :range the elements
  140. :text-des-tabellenelements (A function to give the string of the elements
  141. :f-pop-up-menu A function returning a pop-up
  142.  
  143. Methods
  144. set-table-sequence
  145. table-sequence
  146.  
  147. More advanced dialog-items
  148. *b-auswahl-light*
  149. A composed dialog-items that consists of several radio-buttons or check-buttons
  150. aka (accept 'member or 'subset in CLIM)
  151.  
  152. :wert initial value
  153. :f-Text
  154. :Anordnung-Auswahlelemente  (orientation, not implemented yet)
  155. :selektionstyp (selectiontype :multiple or :single)
  156. :f-bei-Wertaenderung (Function called when the value is changed)
  157.  
  158. *b-bild-view* A widget for bmp-pictures with sensitive areas
  159. *b-bild&text-dialog-item* A widget for bmp-pictures with sensitive areas and correspond texts
  160.  
  161. Shows how to create custom gadgets in ACL/PC (using widget-device)
  162. A Problem is that the events get called on the pane and not on the widget
  163. ;;;;;
  164. What we still can'T do
  165. use view-draw-contens and view-click-event-handler for widgets
  166.  
  167. Windows;;;;
  168.  
  169. *b-window*
  170. provides view-draw-contens and view-click-event-handler and most of the mac-methods
  171. Modal-dialog and return-from-modal-dialog also
  172.  
  173. :view-size
  174. :view-position
  175. :view-font ;warning, the font format in ACL/PC is different
  176. :view-nick-name ;bug
  177. :view-container ;bug
  178. :window-title
  179.  
  180. Methods:
  181. add-subviews
  182. remove-subviews
  183. set-window-title
  184. window-title
  185. window-hide
  186. window-select
  187. window-show
  188. window-close
  189. view-container
  190. set-view-container
  191. set-view-font
  192. view-font
  193. set-view-position
  194. view-size
  195. set-view-size
  196. view-position
  197. subviews
  198. modal-dialog
  199.  
  200. *b-fenster+scroller*
  201. A window with a *bb-sequence-dialog-item* that adjust its size to the window
  202.  
  203. *b-button-window*
  204. :buttons A window with a bottom button line
  205.  
  206. *b-graphics-window*
  207. A window with a scrollable sub-window (aka ccl::scroller-view) and the bottom button line
  208.  
  209. *b-hierarchie-window-light* A portable class browser
  210.  
  211. *b-konfigurierungsdialog*
  212. A configuration dialog, long doc in german, examples in beispiel.lsp, code in b-konfig
  213.  
  214.  
  215. ;menus and menu-items
  216. *b-menu* (with b=pop-up-menue-aufklappen used as a pop-window)
  217. :menu-title
  218.  
  219. Methods:
  220. menu-update
  221. add-menu-items
  222. remove-menu-items
  223. menu-installed-p
  224. menu-deinstall
  225. menu-install
  226. menu-enable
  227. menu-disable
  228.  
  229. set-menubar
  230. menubar
  231.  
  232. *windows-menu* Shows all active windows
  233.  
  234. *b-menu-item*
  235. :menu-item-title
  236. :menu-item-value
  237. :menu-item-action
  238. :disabled
  239. :command-key
  240.  
  241. Methods:
  242. menu-item-update
  243. menu-item-enable
  244. menu-item-disable
  245. set-menu-item-title-portable
  246. set-menu-item-check-mark
  247. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  248. The load-file for all the stuff is in bib-lade.lisp. good luck
  249.